package com.pkk.cloud.support.gateway.limiter.global.properties;

import static com.pkk.cloud.support.gateway.limiter.global.constand.GlobalLimitConstand.DEFAULT_GLOBAL_METHOD_LIMIT;

import java.io.Serializable;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @description: 启用全局过滤器配置
 * @author: peikunkun
 * @create: 2020-03-24 11:00
 **/
@Data
@ConfigurationProperties(prefix = "com.pkk.cloud.support.gateway.limiter.global.method")
public class GlobalMethodRateLimitProperties implements Serializable {

  private static final long serialVersionUID = -5850985567959925980L;


  /**
   * 是否开启方法全局请求配置
   */
  private boolean enable = false;


  /**
   * 限制一秒方法最大的请求
   */
  private Integer limitNum = DEFAULT_GLOBAL_METHOD_LIMIT;


}
